using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Threading;
namespace SHDocVw
{
	internal sealed class DWebBrowserEvents2_EventProvider : DWebBrowserEvents2_Event, IDisposable
	{
		private IConnectionPointContainer m_ConnectionPointContainer;
		private ArrayList m_aEventSinkHelpers;
		private IConnectionPoint m_ConnectionPoint;
		private void Init()
		{
			IConnectionPoint connectionPoint = null;
			Guid guid = new Guid(new byte[]
			{
				160,
				21,
				167,
				52,
				135,
				101,
				208,
				17,
				146,
				74,
				0,
				32,
				175,
				199,
				172,
				77
			});
			this.m_ConnectionPointContainer.FindConnectionPoint(ref guid, out connectionPoint);
			this.m_ConnectionPoint = (IConnectionPoint)connectionPoint;
			this.m_aEventSinkHelpers = new ArrayList();
		}
		public override void add_NewWindow3(DWebBrowserEvents2_NewWindow3EventHandler newWindow3Delegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_NewWindow3Delegate = newWindow3Delegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_NewWindow3(DWebBrowserEvents2_NewWindow3EventHandler dWebBrowserEvents2_NewWindow3EventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_NewWindow3Delegate != null && ((dWebBrowserEvents2_SinkHelper.m_NewWindow3Delegate.Equals((object)dWebBrowserEvents2_NewWindow3EventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_SetPhishingFilterStatus(DWebBrowserEvents2_SetPhishingFilterStatusEventHandler setPhishingFilterStatusDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_SetPhishingFilterStatusDelegate = setPhishingFilterStatusDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_SetPhishingFilterStatus(DWebBrowserEvents2_SetPhishingFilterStatusEventHandler dWebBrowserEvents2_SetPhishingFilterStatusEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_SetPhishingFilterStatusDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_SetPhishingFilterStatusDelegate.Equals((object)dWebBrowserEvents2_SetPhishingFilterStatusEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_WindowStateChanged(DWebBrowserEvents2_WindowStateChangedEventHandler windowStateChangedDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_WindowStateChangedDelegate = windowStateChangedDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_WindowStateChanged(DWebBrowserEvents2_WindowStateChangedEventHandler dWebBrowserEvents2_WindowStateChangedEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_WindowStateChangedDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_WindowStateChangedDelegate.Equals((object)dWebBrowserEvents2_WindowStateChangedEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_NewProcess(DWebBrowserEvents2_NewProcessEventHandler newProcessDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_NewProcessDelegate = newProcessDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_NewProcess(DWebBrowserEvents2_NewProcessEventHandler dWebBrowserEvents2_NewProcessEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_NewProcessDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_NewProcessDelegate.Equals((object)dWebBrowserEvents2_NewProcessEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_ThirdPartyUrlBlocked(DWebBrowserEvents2_ThirdPartyUrlBlockedEventHandler thirdPartyUrlBlockedDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_ThirdPartyUrlBlockedDelegate = thirdPartyUrlBlockedDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_ThirdPartyUrlBlocked(DWebBrowserEvents2_ThirdPartyUrlBlockedEventHandler dWebBrowserEvents2_ThirdPartyUrlBlockedEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_ThirdPartyUrlBlockedDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_ThirdPartyUrlBlockedDelegate.Equals((object)dWebBrowserEvents2_ThirdPartyUrlBlockedEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_RedirectXDomainBlocked(DWebBrowserEvents2_RedirectXDomainBlockedEventHandler redirectXDomainBlockedDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_RedirectXDomainBlockedDelegate = redirectXDomainBlockedDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_RedirectXDomainBlocked(DWebBrowserEvents2_RedirectXDomainBlockedEventHandler dWebBrowserEvents2_RedirectXDomainBlockedEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_RedirectXDomainBlockedDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_RedirectXDomainBlockedDelegate.Equals((object)dWebBrowserEvents2_RedirectXDomainBlockedEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_StatusTextChange(DWebBrowserEvents2_StatusTextChangeEventHandler statusTextChangeDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_StatusTextChangeDelegate = statusTextChangeDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_StatusTextChange(DWebBrowserEvents2_StatusTextChangeEventHandler dWebBrowserEvents2_StatusTextChangeEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_StatusTextChangeDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_StatusTextChangeDelegate.Equals((object)dWebBrowserEvents2_StatusTextChangeEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_ProgressChange(DWebBrowserEvents2_ProgressChangeEventHandler progressChangeDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_ProgressChangeDelegate = progressChangeDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_ProgressChange(DWebBrowserEvents2_ProgressChangeEventHandler dWebBrowserEvents2_ProgressChangeEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_ProgressChangeDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_ProgressChangeDelegate.Equals((object)dWebBrowserEvents2_ProgressChangeEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_CommandStateChange(DWebBrowserEvents2_CommandStateChangeEventHandler commandStateChangeDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_CommandStateChangeDelegate = commandStateChangeDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_CommandStateChange(DWebBrowserEvents2_CommandStateChangeEventHandler dWebBrowserEvents2_CommandStateChangeEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_CommandStateChangeDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_CommandStateChangeDelegate.Equals((object)dWebBrowserEvents2_CommandStateChangeEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_DownloadBegin(DWebBrowserEvents2_DownloadBeginEventHandler downloadBeginDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_DownloadBeginDelegate = downloadBeginDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_DownloadBegin(DWebBrowserEvents2_DownloadBeginEventHandler dWebBrowserEvents2_DownloadBeginEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_DownloadBeginDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_DownloadBeginDelegate.Equals((object)dWebBrowserEvents2_DownloadBeginEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_DownloadComplete(DWebBrowserEvents2_DownloadCompleteEventHandler downloadCompleteDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_DownloadCompleteDelegate = downloadCompleteDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_DownloadComplete(DWebBrowserEvents2_DownloadCompleteEventHandler dWebBrowserEvents2_DownloadCompleteEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_DownloadCompleteDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_DownloadCompleteDelegate.Equals((object)dWebBrowserEvents2_DownloadCompleteEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_TitleChange(DWebBrowserEvents2_TitleChangeEventHandler titleChangeDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_TitleChangeDelegate = titleChangeDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_TitleChange(DWebBrowserEvents2_TitleChangeEventHandler dWebBrowserEvents2_TitleChangeEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_TitleChangeDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_TitleChangeDelegate.Equals((object)dWebBrowserEvents2_TitleChangeEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_PropertyChange(DWebBrowserEvents2_PropertyChangeEventHandler propertyChangeDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_PropertyChangeDelegate = propertyChangeDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_PropertyChange(DWebBrowserEvents2_PropertyChangeEventHandler dWebBrowserEvents2_PropertyChangeEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_PropertyChangeDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_PropertyChangeDelegate.Equals((object)dWebBrowserEvents2_PropertyChangeEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_BeforeNavigate2(DWebBrowserEvents2_BeforeNavigate2EventHandler beforeNavigate2Delegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_BeforeNavigate2Delegate = beforeNavigate2Delegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_BeforeNavigate2(DWebBrowserEvents2_BeforeNavigate2EventHandler dWebBrowserEvents2_BeforeNavigate2EventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_BeforeNavigate2Delegate != null && ((dWebBrowserEvents2_SinkHelper.m_BeforeNavigate2Delegate.Equals((object)dWebBrowserEvents2_BeforeNavigate2EventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_NewWindow2(DWebBrowserEvents2_NewWindow2EventHandler newWindow2Delegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_NewWindow2Delegate = newWindow2Delegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_NewWindow2(DWebBrowserEvents2_NewWindow2EventHandler dWebBrowserEvents2_NewWindow2EventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_NewWindow2Delegate != null && ((dWebBrowserEvents2_SinkHelper.m_NewWindow2Delegate.Equals((object)dWebBrowserEvents2_NewWindow2EventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_NavigateComplete2(DWebBrowserEvents2_NavigateComplete2EventHandler navigateComplete2Delegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_NavigateComplete2Delegate = navigateComplete2Delegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_NavigateComplete2(DWebBrowserEvents2_NavigateComplete2EventHandler dWebBrowserEvents2_NavigateComplete2EventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_NavigateComplete2Delegate != null && ((dWebBrowserEvents2_SinkHelper.m_NavigateComplete2Delegate.Equals((object)dWebBrowserEvents2_NavigateComplete2EventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_DocumentComplete(DWebBrowserEvents2_DocumentCompleteEventHandler documentCompleteDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_DocumentCompleteDelegate = documentCompleteDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_DocumentComplete(DWebBrowserEvents2_DocumentCompleteEventHandler dWebBrowserEvents2_DocumentCompleteEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_DocumentCompleteDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_DocumentCompleteDelegate.Equals((object)dWebBrowserEvents2_DocumentCompleteEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_OnQuit(DWebBrowserEvents2_OnQuitEventHandler onQuitDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_OnQuitDelegate = onQuitDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_OnQuit(DWebBrowserEvents2_OnQuitEventHandler dWebBrowserEvents2_OnQuitEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_OnQuitDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_OnQuitDelegate.Equals((object)dWebBrowserEvents2_OnQuitEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_OnVisible(DWebBrowserEvents2_OnVisibleEventHandler onVisibleDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_OnVisibleDelegate = onVisibleDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_OnVisible(DWebBrowserEvents2_OnVisibleEventHandler dWebBrowserEvents2_OnVisibleEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_OnVisibleDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_OnVisibleDelegate.Equals((object)dWebBrowserEvents2_OnVisibleEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_OnToolBar(DWebBrowserEvents2_OnToolBarEventHandler onToolBarDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_OnToolBarDelegate = onToolBarDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_OnToolBar(DWebBrowserEvents2_OnToolBarEventHandler dWebBrowserEvents2_OnToolBarEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_OnToolBarDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_OnToolBarDelegate.Equals((object)dWebBrowserEvents2_OnToolBarEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_OnMenuBar(DWebBrowserEvents2_OnMenuBarEventHandler onMenuBarDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_OnMenuBarDelegate = onMenuBarDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_OnMenuBar(DWebBrowserEvents2_OnMenuBarEventHandler dWebBrowserEvents2_OnMenuBarEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_OnMenuBarDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_OnMenuBarDelegate.Equals((object)dWebBrowserEvents2_OnMenuBarEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_OnStatusBar(DWebBrowserEvents2_OnStatusBarEventHandler onStatusBarDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_OnStatusBarDelegate = onStatusBarDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_OnStatusBar(DWebBrowserEvents2_OnStatusBarEventHandler dWebBrowserEvents2_OnStatusBarEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_OnStatusBarDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_OnStatusBarDelegate.Equals((object)dWebBrowserEvents2_OnStatusBarEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_OnFullScreen(DWebBrowserEvents2_OnFullScreenEventHandler onFullScreenDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_OnFullScreenDelegate = onFullScreenDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_OnFullScreen(DWebBrowserEvents2_OnFullScreenEventHandler dWebBrowserEvents2_OnFullScreenEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_OnFullScreenDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_OnFullScreenDelegate.Equals((object)dWebBrowserEvents2_OnFullScreenEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_OnTheaterMode(DWebBrowserEvents2_OnTheaterModeEventHandler onTheaterModeDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_OnTheaterModeDelegate = onTheaterModeDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_OnTheaterMode(DWebBrowserEvents2_OnTheaterModeEventHandler dWebBrowserEvents2_OnTheaterModeEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_OnTheaterModeDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_OnTheaterModeDelegate.Equals((object)dWebBrowserEvents2_OnTheaterModeEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_WindowSetResizable(DWebBrowserEvents2_WindowSetResizableEventHandler windowSetResizableDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_WindowSetResizableDelegate = windowSetResizableDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_WindowSetResizable(DWebBrowserEvents2_WindowSetResizableEventHandler dWebBrowserEvents2_WindowSetResizableEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_WindowSetResizableDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_WindowSetResizableDelegate.Equals((object)dWebBrowserEvents2_WindowSetResizableEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_WindowSetLeft(DWebBrowserEvents2_WindowSetLeftEventHandler windowSetLeftDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_WindowSetLeftDelegate = windowSetLeftDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_WindowSetLeft(DWebBrowserEvents2_WindowSetLeftEventHandler dWebBrowserEvents2_WindowSetLeftEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_WindowSetLeftDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_WindowSetLeftDelegate.Equals((object)dWebBrowserEvents2_WindowSetLeftEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_WindowSetTop(DWebBrowserEvents2_WindowSetTopEventHandler windowSetTopDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_WindowSetTopDelegate = windowSetTopDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_WindowSetTop(DWebBrowserEvents2_WindowSetTopEventHandler dWebBrowserEvents2_WindowSetTopEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_WindowSetTopDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_WindowSetTopDelegate.Equals((object)dWebBrowserEvents2_WindowSetTopEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_WindowSetWidth(DWebBrowserEvents2_WindowSetWidthEventHandler windowSetWidthDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_WindowSetWidthDelegate = windowSetWidthDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_WindowSetWidth(DWebBrowserEvents2_WindowSetWidthEventHandler dWebBrowserEvents2_WindowSetWidthEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_WindowSetWidthDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_WindowSetWidthDelegate.Equals((object)dWebBrowserEvents2_WindowSetWidthEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_WindowSetHeight(DWebBrowserEvents2_WindowSetHeightEventHandler windowSetHeightDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_WindowSetHeightDelegate = windowSetHeightDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_WindowSetHeight(DWebBrowserEvents2_WindowSetHeightEventHandler dWebBrowserEvents2_WindowSetHeightEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_WindowSetHeightDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_WindowSetHeightDelegate.Equals((object)dWebBrowserEvents2_WindowSetHeightEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_WindowClosing(DWebBrowserEvents2_WindowClosingEventHandler windowClosingDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_WindowClosingDelegate = windowClosingDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_WindowClosing(DWebBrowserEvents2_WindowClosingEventHandler dWebBrowserEvents2_WindowClosingEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_WindowClosingDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_WindowClosingDelegate.Equals((object)dWebBrowserEvents2_WindowClosingEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_ClientToHostWindow(DWebBrowserEvents2_ClientToHostWindowEventHandler clientToHostWindowDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_ClientToHostWindowDelegate = clientToHostWindowDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_ClientToHostWindow(DWebBrowserEvents2_ClientToHostWindowEventHandler dWebBrowserEvents2_ClientToHostWindowEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_ClientToHostWindowDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_ClientToHostWindowDelegate.Equals((object)dWebBrowserEvents2_ClientToHostWindowEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_SetSecureLockIcon(DWebBrowserEvents2_SetSecureLockIconEventHandler setSecureLockIconDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_SetSecureLockIconDelegate = setSecureLockIconDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_SetSecureLockIcon(DWebBrowserEvents2_SetSecureLockIconEventHandler dWebBrowserEvents2_SetSecureLockIconEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_SetSecureLockIconDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_SetSecureLockIconDelegate.Equals((object)dWebBrowserEvents2_SetSecureLockIconEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_FileDownload(DWebBrowserEvents2_FileDownloadEventHandler fileDownloadDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_FileDownloadDelegate = fileDownloadDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_FileDownload(DWebBrowserEvents2_FileDownloadEventHandler dWebBrowserEvents2_FileDownloadEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_FileDownloadDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_FileDownloadDelegate.Equals((object)dWebBrowserEvents2_FileDownloadEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_NavigateError(DWebBrowserEvents2_NavigateErrorEventHandler navigateErrorDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_NavigateErrorDelegate = navigateErrorDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_NavigateError(DWebBrowserEvents2_NavigateErrorEventHandler dWebBrowserEvents2_NavigateErrorEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_NavigateErrorDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_NavigateErrorDelegate.Equals((object)dWebBrowserEvents2_NavigateErrorEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_PrintTemplateInstantiation(DWebBrowserEvents2_PrintTemplateInstantiationEventHandler printTemplateInstantiationDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_PrintTemplateInstantiationDelegate = printTemplateInstantiationDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_PrintTemplateInstantiation(DWebBrowserEvents2_PrintTemplateInstantiationEventHandler dWebBrowserEvents2_PrintTemplateInstantiationEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_PrintTemplateInstantiationDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_PrintTemplateInstantiationDelegate.Equals((object)dWebBrowserEvents2_PrintTemplateInstantiationEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_PrintTemplateTeardown(DWebBrowserEvents2_PrintTemplateTeardownEventHandler printTemplateTeardownDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_PrintTemplateTeardownDelegate = printTemplateTeardownDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_PrintTemplateTeardown(DWebBrowserEvents2_PrintTemplateTeardownEventHandler dWebBrowserEvents2_PrintTemplateTeardownEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_PrintTemplateTeardownDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_PrintTemplateTeardownDelegate.Equals((object)dWebBrowserEvents2_PrintTemplateTeardownEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_UpdatePageStatus(DWebBrowserEvents2_UpdatePageStatusEventHandler updatePageStatusDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_UpdatePageStatusDelegate = updatePageStatusDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_UpdatePageStatus(DWebBrowserEvents2_UpdatePageStatusEventHandler dWebBrowserEvents2_UpdatePageStatusEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_UpdatePageStatusDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_UpdatePageStatusDelegate.Equals((object)dWebBrowserEvents2_UpdatePageStatusEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void add_PrivacyImpactedStateChange(DWebBrowserEvents2_PrivacyImpactedStateChangeEventHandler privacyImpactedStateChangeDelegate)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint == null)
				{
					this.Init();
				}
				DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = new DWebBrowserEvents2_SinkHelper();
				int dwCookie = 0;
				this.m_ConnectionPoint.Advise((object)dWebBrowserEvents2_SinkHelper, out dwCookie);
				dWebBrowserEvents2_SinkHelper.m_dwCookie = dwCookie;
				dWebBrowserEvents2_SinkHelper.m_PrivacyImpactedStateChangeDelegate = privacyImpactedStateChangeDelegate;
				this.m_aEventSinkHelpers.Add((object)dWebBrowserEvents2_SinkHelper);
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void remove_PrivacyImpactedStateChange(DWebBrowserEvents2_PrivacyImpactedStateChangeEventHandler dWebBrowserEvents2_PrivacyImpactedStateChangeEventHandler)
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_aEventSinkHelpers != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper;
						while (true)
						{
							dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							if (dWebBrowserEvents2_SinkHelper.m_PrivacyImpactedStateChangeDelegate != null && ((dWebBrowserEvents2_SinkHelper.m_PrivacyImpactedStateChangeDelegate.Equals((object)dWebBrowserEvents2_PrivacyImpactedStateChangeEventHandler) ? 1 : 0) & 255) != 0)
							{
								break;
							}
							num++;
							if (num >= count)
							{
								goto IL_E1;
							}
						}
						this.m_aEventSinkHelpers.RemoveAt(num);
						this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
						if (count <= 1)
						{
							Marshal.ReleaseComObject(this.m_ConnectionPoint);
							this.m_ConnectionPoint = null;
							this.m_aEventSinkHelpers = null;
						}
					}
				}
				IL_E1:;
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public DWebBrowserEvents2_EventProvider(object obj)
		{
			this.m_ConnectionPointContainer = (IConnectionPointContainer)obj;
		}
		public override void Finalize()
		{
			Monitor.Enter(this);
			try
			{
				if (this.m_ConnectionPoint != null)
				{
					int count = this.m_aEventSinkHelpers.Count;
					int num = 0;
					if (0 < count)
					{
						do
						{
							DWebBrowserEvents2_SinkHelper dWebBrowserEvents2_SinkHelper = (DWebBrowserEvents2_SinkHelper)this.m_aEventSinkHelpers[num];
							this.m_ConnectionPoint.Unadvise(dWebBrowserEvents2_SinkHelper.m_dwCookie);
							num++;
						}
						while (num < count);
					}
					Marshal.ReleaseComObject(this.m_ConnectionPoint);
				}
			}
			catch (Exception)
			{
			}
			finally
			{
				Monitor.Exit(this);
			}
		}
		public override void Dispose()
		{
			this.Finalize();
			GC.SuppressFinalize(this);
		}
	}
}
